#ifndef PUSHSERVER_SERVER_H
#define PUSHSERVER_SERVER_H

#include <httplib/httplib.h>
#include <nlohmann/json.hpp>
#include <logger/Logger.h>
#include "Handler.h"
#include <config/Config.h>

using namespace std;
using nlohmann::json;
using namespace _ServerHandle_;

class Server : private httplib::Server {
public:
    explicit Server(ServerConfig config);

    bool listen();

    ~Server();

private:
    ServerConfig svrConfig;
    Logger *logger = new Logger("Server");
};

extern Server *svr;

#endif //PUSHSERVER_SERVER_H
